import request from "../utils/request.js";
import {encrypt} from "@/utils/jsencrypt.js";

export function login(username,password,code,uuid){
    password = encrypt(password)
    return request({
        url: '/user/login',
        method: 'post',
        data: {
            username,
            password,
            code,
            uuid
        }
    })
}

export function logout(user){
    return request({
        url: '/user/logout',
        method: 'get',
    })
}

export function getCodeImg(){
    return request({
        url: '/code',
        method: 'get'
    })
}

export function checkToken(){
    return request({
        url: '/checkToken',
        method: 'get'
    })
}

export function getRouters(){
    return request({
        url: '/menu/getRouters',
        method: 'get'
    })
}

